<template>
  <!-- 对话框 -->
  <div>
    <el-dialog :title="dialogTitle" :visible="dialogVisible" width="30%" :before-close="handleClose">
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-form-item prop="positionTime" label="时间">
          <el-date-picker size="mini"
            v-model="form.positionTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item prop="variety" label="品种:">
          <el-select v-model="form.variety" placeholder="请选择" size="mini">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        
        <el-form-item prop="positionValue" label="净仓位">
          <el-input v-model="form.positionValue" size="mini" placeholder="请输入净仓位" />
        </el-form-item>
        <el-form-item prop="multipointValue" label="多头">
          <el-input v-model="form.multipointValue" size="mini" placeholder="请输入多头" />
        </el-form-item>
        <el-form-item prop="nominalValue" label="空头">
          <el-input v-model="form.nominalValue" size="mini" placeholder="请输入空头" />
        </el-form-item>
        <el-form-item>
          <el-row type="flex" justify="end" style="margin-top: 10px;">
            <el-button size="mini" @click="handleClose">取 消</el-button>
            <el-button size="mini" type="primary" @click="btnOK">确 定</el-button>
          </el-row>
        </el-form-item>
      </el-form>

    </el-dialog>

  </div>

</template>

<script>

export default {
  name: 'CftcAdd',
  props: {
    dialogVisible: {
      default: false,
      type: Boolean
    },
    dialogTitle:'',
    form:{},
    options:[],
    data:null
  },
  data() {
    return {
      rules:[],
    }
  },
  watch: {
    
  },
  mounted() {

  },

  methods: {
    // 取消
    handleClose() {
      this.$emit('update:dialogVisible', false)
    },

    // 确定
    async btnOK() {
      this.data.fn.submit();
    },
   
    Close() {
      this.showVisible = false
      this.handleClose()
    },
   
  }
}
</script>

<style lang="scss" scoped></style>
